program P5_5;
const n=15;
var	a:array[1..N] of integer;
	k:integer;
	i,j,tmp:integer;
begin
for i:=1 to n do begin
	a[i]:=random(10)+j;
	j:=j+10;
	end;
for i:=1 to n do write(a[i]:6); writeln;
write('>>> enter K: ');
readln(k);
j:=n;
for i:=k downto 1 do begin
	tmp:=a[j];
	a[j]:=a[i];
	a[i]:=tmp;
	dec(j);
	end;
for i:=1 to n do write(a[i]:6); writeln;
end.
